package lab02.test06;
import java.util.Scanner;
public class Test06 {

//    Triangle测试类
//    public static void main(String[] args) {
//        Triangle triangle =  new Triangle();
//        Scanner sc = new Scanner(System.in);
//            System.out.println("请输入三角形的三条边长：");
//            double oneEdge = sc.nextDouble();
//            double twoEdge = sc.nextDouble();
//            double threeEdge = sc.nextDouble();
//            triangle.setOneEdge(oneEdge);
//            triangle.setTwoEdge(twoEdge);
//            triangle.setThreeEdge(threeEdge);
//            if (triangle.triangle() == true){
//                System.out.println("该三角形的周长为" + triangle.perimeter());
//                System.out.println("该三角形的面积为" + triangle.area(triangle.perimeter()));
//                System.out.println("请输出要修改的三边的值：");
//                double oneEdgeModify = sc.nextDouble();
//                double twoEdgeModify = sc.nextDouble();
//                double threeEdgeModify = sc.nextDouble();
//                triangle.modify(oneEdgeModify,twoEdgeModify,threeEdgeModify);
//            }else
//                System.out.println("该三边不能构成三角形。");
//        }

    //    Ladder测试类。
//public static void main(String[] args) {
//    Scanner sc = new Scanner(System.in);
//    Ladder ladder = new Ladder();
//    System.out.println("请分别输入梯形的上底，下底和高：");
//    double upper = sc.nextDouble();
//    double bottom = sc.nextDouble();
//    double height = sc.nextDouble();
//    ladder.setUpper(upper);
//    ladder.setBottom(bottom);
//    ladder.setHeight(height);
//    System.out.println("该梯形的面积为：" + ladder.area());
//}
    //Circle测试类
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Circle circle = new Circle();
        System.out.println("请输入圆的半径：");
        double radius = sc.nextDouble();
        circle.setRadius(radius);
        System.out.println("该圆的周长为：" + circle.peremiter());
        System.out.println("该圆的周长为：" + circle.area());

    }
}
